//index.js
//获取应用实例

var rrtv = require('../../utils/rrtv.js')
var app = getApp()
Page({
    data: {
        shows: [],
    },
    //事件处理函数
    bindShowDetailTap: function (event) {
        app.globalData.show = event.currentTarget.dataset.show;

        wx.navigateTo({
            url: '../show/show'
        })
    },
    onLoad: function () {
        console.log('onLoad')
    },
    onShow: function () {
        this.fetchTvInfo();
    },

    //从人人服务器获取美剧信息
    fetchTvInfo: function () {
        var that = this;
        var VideoInfoURI = '/v3plus/video/indexInfo';//美剧合集
        var SearchURI = '/v3plus/video/search';
        var VideoSeasonRankListURI = '/video/seasonRankingList';//最好看的美剧
        var RrtvUsTvIndexURI = '/v3plus/season/usk/index';//不全
        var postPara = {};
        rrtv.doPostRequest({
            uri: VideoSeasonRankListURI,
            paraObj: postPara,
            successCallback: function (data) {
                var results = data.data.seasonRankingList;
                that.setData({ shows: results })
            },
            failCallback: function () {
                console.log('fail')
            },
        });





    }



})
